package com.kefu.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

// 标识为配置类，Spring会自动扫描并加载
@Configuration
public class SecurityConfig {

    // 定义BCryptPasswordEncoder的Bean
    @Bean
    public BCryptPasswordEncoder bCryptPasswordEncoder() {
        // 返回BCryptPasswordEncoder实例，Spring会将其存入容器
        return new BCryptPasswordEncoder();
    }
}
